home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: Parent Power / The Sunday Times - Parent Power.iso / mac / jars / CDApp.jar / oecPoolLocal.jocl < prev    next >
Extensible Markup Language  |  2004-06-24  |  2KB  |  53 lines

  1. <?xml version="1.0"?>
  2. <object class="org.apache.commons.dbcp.PoolableConnectionFactory" xmlns="http://apache.org/xml/xmlns/jakarta/commons/jocl">
  3.  
  4.    <!--
  5.       The first argument to PoolableConnectionFactory is a ConnectionFactory.
  6.       We'll use a DriverManagerConnectionFactory, passing in the appropriate
  7.       connect string for the underlying driver.
  8.     -->
  9.    <object class="org.apache.commons.dbcp.DriverManagerConnectionFactory">
  10.  
  11.       <string value="jdbc:britannica:axioncd:oecdb:${ARTICLE}/data/oecx"/>
  12.  
  13.       <object class="java.util.Properties" null="true"/>
  14.    </object>
  15.  
  16.    <!--
  17.       The next argument is the pool to use.
  18.     -->
  19.    <object class="org.apache.commons.pool.impl.GenericObjectPool">
  20.      <object class="org.apache.commons.pool.PoolableObjectFactory"
  21.              null="true"/>
  22.      <int value="3"/>         <!-- Max active -->
  23.      <byte value="2"/>        <!-- Exhausted action (2=grow) -->
  24.      <long value="0"/>        <!-- Max wait -->
  25.      <int value="0"/>         <!-- Max idle -->
  26.      <boolean value="false"/>  <!-- Test on borrow -->
  27.      <boolean value="false"/> <!-- Test on return -->
  28.    </object>
  29.  
  30.    <!--
  31.        The next argument is the KeyedObjectPoolFactory to use to create
  32.        pools for storing PreparedStatements.  This functionality is
  33.        optional, we'll just use null.
  34.    -->
  35.    <object class="org.apache.commons.pool.impl.StackKeyedObjectPoolFactory">
  36.       <int value="3"/> 
  37.    </object> 
  38.  
  39.    <!--
  40.       The next argument is the query to use to validate that a Connection is
  41.       still up and running.  It should return at least one row.
  42.       This functionality is optional. We'll just set it to null.
  43.     -->
  44.    <string value="CHECKFILESTATE"/>
  45.  
  46.    <!-- The default "read only" value for Connections. -->
  47.    <boolean value="true"/>
  48.  
  49.    <!-- The default "auto commit" value for Connections. -->
  50.    <boolean value="false"/>
  51.  
  52. </object>
  53.